package guda.house.biz.form;

import guda.house.dal.dataobject.SysVarDO;

import javax.validation.constraints.NotNull;

/**
 * Created by well on 15/11/10.
 */
public class SysVarEditForm extends SysVarForm{

    @NotNull(message = "不能为空")
    private Long varId;

    public void initForm(SysVarDO sysVarDO){
        setVarId(sysVarDO.getVarId());
        setVarType(sysVarDO.getVarType());
        setVarStatus(sysVarDO.getVarStatus());
        setVarValue(sysVarDO.getVarValue());
        setVillageId(sysVarDO.getVillageId());

    }

    public SysVarDO toDO(){
        SysVarDO sysVarDO = super.toDO();
        sysVarDO.setVarId(varId);
        return sysVarDO;
    }

    public Long getVarId() {
        return varId;
    }

    public void setVarId(Long varId) {
        this.varId = varId;
    }
}
